package com.example.demo.verify;

import javax.validation.ConstraintValidator;
import javax.validation.ConstraintValidatorContext;

public class NoEmptyValidator implements ConstraintValidator<NoEmpty, Object> {
    @Override
    public boolean isValid(Object obj, ConstraintValidatorContext context) {
        if (obj == null || obj.toString().trim().isEmpty()) {
            return false;
        }
        return true;
    }
}
